<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>component2</title>
<script src="js/vue.min.js"></script>
</head>
<body>
<div id="app">
	<lz></lz>
</div>

<script>
var Child = {
  template: '<h1>自定义组件!</h1>'
}

// 创建根实例
new Vue({
  el: '#app',
  components: {
    // <lz> 将只在父模板可用
    'lz': Child
  }
})
</script>
</body>
</html>